<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.tjsinfo.tjsoa.system.vo.User"%>
<%@page import="com.tjsinfo.tjsoa.common.ToolKit"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ResourceBundle bundle = ResourceBundle.getBundle("com.tjsinfo.tjsoa.fileExpress.properties.FileExpress");
String fileUploadPath = bundle.getString("fileupload");
fileUploadPath = fileUploadPath.replace("\\","\\\\");
String treePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/RQOAtree/";
String nowSQL = ToolKit.getProperties("com/tjsinfo/tjsoa/mail/properties/systemResource.properties", this).getProperty("nowSQL");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>粮油集团办公自动化协作平台</title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" id="txlz7"/>
	<style type="text/css">
			td {
				font:12px/170% "宋体", "新宋体", "黑体"; color:#000
			}
			th {
				font:12px/170% "宋体", "新宋体", "黑体"; color:#000
			}
	</style>
	<style>
		 #divgroup {width:100%;height:100%;overflow:hidden;}
         .trBgColor { background-color:#A4D7E8; cursor: hand;}
         .trGroupColor { background-color:#C3EBF9; cursor: hand;}
         .trHiddivColor { background-color:#c3ebf9; cursor: hand;}
    	
		#container {
		    width:600px;
		    height:300px;
		    border:3px solid #c3daf9;
		}
		
		.calendar {
		    background-image:url(<%=basePath%>images/icon_64.gif) !important;
		}
		
		.xinjianqian {
		    background-image: url(<%=basePath%>images/s_01.gif) !important;
		}
		.xiugaiqian {
		    background-image: url(<%=basePath%>images/s_02.gif) !important;
		}
		.shanchuqian {
		    background-image: url(<%=basePath%>images/s_03.gif) !important;
		}
		.daohang {
		    background-image: url(<%=basePath%>images/ju.gif) !important;
		}
		.menu-title{
		    background: #ebeadb url(<%=basePath%>fileExpress/images/m_icon07.gif) repeat-x;
		    border-bottom:1px solid #99bbe8;
		    color:#15428b;
		    font:bold 10px tahoma,arial,verdana,sans-serif;
		    display:block;
		    padding:3px;
		}
.window {
	DISPLAY: none;
	LEFT: 300px;
	OVERFLOW: hidden;
	WIDTH: 500px;
	POSITION: absolute;
	TOP: 100px;
	HEIGHT: 200px
}

.windowTop {
	BACKGROUND-POSITION: right top;
	BACKGROUND-IMAGE: url(<%=basePath%>fileExpress/images/window_top_end.png);
	OVERFLOW: hidden;
	CURSOR: move;
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 30px
}

.windowTopContent {
	BACKGROUND-POSITION: left top;
	FONT-WEIGHT: bold;
	FONT-SIZE: 14px;
	BACKGROUND-IMAGE: url(<%=basePath%>fileExpress/images/window_top_start.png);
	OVERFLOW: hidden;
	COLOR: #206D85;
	TEXT-INDENT: 10px;
	LINE-HEIGHT: 30px;
	MARGIN-RIGHT: 13px;
	BACKGROUND-REPEAT: no-repeat;
	FONT-FAMILY: Arial, Helvetica, sans-serif;
	HEIGHT: 30px
}
#windowBottom {
	BACKGROUND-POSITION: right bottom;
	BACKGROUND-IMAGE:
		url(<%=basePath%>fileExpress/images/window_bottom_end.png);
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 370px
}

.windowBottomContent {
	BACKGROUND-POSITION: left bottom;
	BACKGROUND-IMAGE:
		url(<%=basePath%>fileExpress/images/window_bottom_start.png);
	MARGIN-RIGHT: 13px;
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 370px
}

.windowResize {
	RIGHT: 3px;
	CURSOR: se-resize;
	BOTTOM: 5px;
	POSITION: absolute
}

#windowClose {
	RIGHT: 10px;
	CURSOR: pointer;
	POSITION: absolute;
	TOP: 10px
}

.windowContent {
	BORDER-RIGHT: #6caf00 1px solid;
	BORDER-TOP: #6caf00 1px solid;
	FONT-SIZE: 11px;
	LEFT: 10px;
	OVERFLOW: auto;
	BORDER-LEFT: #6caf00 1px solid;
	WIDTH: 475px;
	MARGIN-RIGHT: 15px;
	BORDER-BOTTOM: #6caf00 1px solid;
	FONT-FAMILY: Arial, Helvetica, sans-serif;
	POSITION: absolute;
	TOP: 30px;
	HEIGHT: 150px;
	BACKGROUND-COLOR: #fff
}
         .hiddiv {
			display: none;
			position: absolute;
			top: 6%;
			left: 0%;
			width: 84;;
			height: 72;
			border: 1px solid #FFF;
			border-bottom:none;
			z-index:1002;
			overflow: auto;
		}
		.insertGroup {
			display: none;
			position: absolute;
			border: 1px solid #FFF;
			border-bottom:none;
			z-index:1002;
			overflow: auto;
		}
		.updateGroupIndexDiv {
			display: none;
			position: absolute;
			border: 1px solid #FFF;
			border-bottom:none;
			z-index:1002;
			overflow: auto;
		}
		.deleteGroupIndexDiv {
			display: none;
			position: absolute;
			border: 1px solid #FFF;
			border-bottom:none;
			z-index:1002;
			overflow: auto;
		}
		.black_overlays{
			display: none;
			position: absolute;
			top: 0%;
			left: 0%;
			width: 100%;
			height: 100%;
			background-color: #C1EBFC;
			z-index:1002;
			-moz-opacity: 0.8;
			opacity:.80;
			filter: alpha(opacity=30);
		}
		.cha {
			padding-top: 0px
		}
		.tree {
	display: none;
	position: absolute;
	top: 25%;
	left: 30%;
	width: 253px;
	height: 235px;
	border: 1px solid #11557B;
	border-bottom: block;
	background-color: #E2F7FF;
	z-index: 1003;
	overflow: auto;
}
   </style>
	<!-- 多系统树 开始 -->
	<link href="<%=treePath %>ajaxLibrary/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-base.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-all.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/validator.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/init.js"></script>
	<script type="text/javascript" src="<%=treePath %>js/system/singleuserinfocheckedtree.js"></script>
	<script type="text/javascript">
		function peopleTree(){
			var a = true;
			for (var j = 0; j <= dFileNum-1; j++) {
				box = eval("document.checkboxform.dFile" + j);
				if(box.checked == true){
					a = false;
				}
			}
			if(a){
				Ext.MessageBox.alert('提示','<nobr>请选择转发的文件！</nobr>');
				return;
			}
		
			var win = singleuserinfocheckedtree(<%=nowSQL %>);
			win.show();
			win.on("winsubmint",function(data){
				document.getElementById('zhuan_username').value = data.usernametext;
				document.getElementById('zhuan_userid').value = data.userid;
				treeclose();
				win.hide();
			});
		}
	
		function treeclose(){
			var username = document.getElementById('zhuan_username').value;
			if(username == null || username == ''|| username == ','){
				Ext.MessageBox.alert('提示','<nobr>请选择接收的系统用户</nobr>');
				return;
			}
		    var a = false;
		  	var b = 0;
			var ids = '';
			for (var j = 0; j <= dFileNum-1; j++) {
				box = eval("document.checkboxform.dFile" + j);
				if(box.checked == true){
					a = true;
					ids += box.id+",";
					b++;
				}
			}
			if(b>5){
				Ext.MessageBox.alert('提示','<nobr>一次性最多允许转发5个文件，请重新选择！</nobr>');
				return;
				b=0;
			}
			if(a){
				if(confirm('您是否确认转发文件？')){
					document.getElementById("zhuan_fileid").value=ids;
					document.zhuanForm.submit();
				}
			}else{
				Ext.MessageBox.alert('提示','<nobr>请选择转发的文件！</nobr>');
			}
		}
	</script>
	<!-- 结束 -->
	
	<script src="<%=basePath%>js/move.js" type=text/javascript></script>
	
	<script src="<%=basePath%>js/idrag.js" type=text/javascript></script>
	<script src="<%=basePath%>js/idrop.js" type=text/javascript></script>
	<script src="<%=basePath%>js/iutil.js" type=text/javascript></script>
	<script src="<%=basePath%>js/iresizable.js" type=text/javascript></script>
	<script src="<%=basePath%>js/ifxtransfer.js" type=text/javascript></script>
	            
	<script type='text/javascript' src='<%=basePath%>dwr/interface/FileExpressGroupBo.js'></script>
	<script type='text/javascript' src='<%=basePath%>dwr/interface/FileExpressPageBo.js'></script>
	<script type='text/javascript' src='<%=basePath%>dwr/interface/FileExpressFileBo.js'></script>
	<script type='text/javascript' src="<%=basePath%>dwr/engine.js"></script>
	<script type='text/javascript' src="<%=basePath%>dwr/util.js"></script>
	
	<%
		User user = (User)session.getAttribute("user");
		String group_id = (String)request.getAttribute("group_id");
		String user_page = (String)request.getAttribute("user_page");
		String user_id = (String)request.getAttribute("user_id");
		String first = (String)request.getAttribute("first");
		String maxExpress = (String)request.getAttribute("maxExpress");
		if(first == null || "".equals(first))first = "shi";
		String permission = user.getPermission();
		String dirName = request.getSession().getServletContext().getRealPath("/");
		dirName = dirName.replace("\\","\\\\");
		String expressUserNum = bundle.getString("expressUserNum");
	 %>
		<script>
	function zhuanfa(){
		if(document.getElementById('zhuan_userid').value==''){
 			Ext.MessageBox.alert('提示框','<nobr>请选择要接收文件的系统用户</nobr>');
			return;
		}
		var userid = document.getElementById('zhuan_userid').value;
		userid = userid.substring(0,userid.length-1);
	  	var a = false;
	  	var b = 0;
		var ids = '';
		for (var j = 0; j <= dFileNum-1; j++) {
			box = eval("document.checkboxform.dFile" + j);
			if(box.checked == true){
				a = true;
				ids += box.id.substring(0,box.id.length)+",";
				b++;
			}
		}
		if(a){
			Ext.MessageBox.confirm('提示框', '您是否确认转发文件？', function(btn){
				if(btn=='yes'){
					document.getElementById("zhuan_fileid").value=ids;
					document.zhuanForm.submit();
				}else{
 					document.getElementById('zhuan_userid').value=='';
				}
			});
		}else{
			Ext.MessageBox.alert('提示框','<nobr>请选择转发的文件</nobr>');
 			document.getElementById('zhuan_userid').value=='';
		}
	}
	
	function closeErrorDiv(){
		document.getElementById("blackdiv").style.display = "none";
		document.getElementById("ErrorDiv").style.display = "none";
	}
	
	function xianshiErrorDiv(){
		document.getElementById("ErrorDiv").style.top = document.body.clientHeight/4;
		document.getElementById("ErrorDiv").style.left = document.body.clientWidth/8;
		document.getElementById("blackdiv").style.display = "block";
		document.getElementById("ErrorDiv").style.display = "block";
	}
	
	function xianshiErrorDiv2(){
		document.getElementById("ErrorDiv2").style.top = document.body.clientHeight/4;
		document.getElementById("ErrorDiv2").style.left = document.body.clientWidth/8;
		document.getElementById("blackdiv").style.display = "block";
		document.getElementById("ErrorDiv2").style.display = "block";
	}
	</script>
	<script type="text/javascript">
		window.onload = function(){initselectusercheck();
		windowonload();
			var menu = new Ext.menu.Menu({
		        id: 'mainMenu',
		        width:100,
		        items: [
		            {
		                text: '新建文件夹',
		            	iconCls: 'xinjianqian',  // <-- icon
		                handler: function(){
		                	iconCls: 'bmenu1',
							xianshiInsertGroup();
						}
		            },
		            {
		                text: '修改文件夹',
		                iconCls: 'xiugaiqian',  // <-- icon
			        	handler: function(){
							xianshiUpdateGroup();
						}
		            },
		            {
		                text: '删除文件夹',
		                iconCls: 'shanchuqian',  // <-- icon
		                handler: function(){
							xianshiDeleteGroup();
						}
		            }
		        ]
		    });
			var tb = new Ext.Toolbar(
				{
					height:25
				}
			);
		
			tb.add(
			{
		            text:'发送',
		            iconCls: 'daohang',
		        	handler: function(){
						window.location.href="";
						location.href="<%=basePath %>fileExpress/fileExpress.jsp?maxExpress=<%=maxExpress %>";
					}
		    }
		    ,
		    {
		            text:'转发',
		            iconCls: 'daohang',
		        	handler: function(){
		        		document.getElementById('zhuan_userid').value = "";
		        		document.getElementById('node2').value = "";
		        		peopleTree();
					}
		    },
		    {
		            text:'编辑文件夹',
		            iconCls: 'daohang',
		            menu: menu  // assign menu by instance
		        
		    }
		    ,
		    
		    {
		            text:'移动文件',
		            iconCls: 'daohang',
		        	handler: function(){
						window.location.href="";
						location.href="<%=basePath %>tjsinfo/tjsoa/fileExpress/intoCopyFile.do";
					}
		    }
		    ,
		    
		    {
		            text:'删除文件',
		            iconCls: 'daohang',
		        	handler: function(){
		        		deleteListUser();
					}
		    }
		    );
		
		    tb.render('menu');
		}
		var group_id = '<%=group_id %>';
		var intpage = <%=user_page %>;
		var first = '<%=first %>';
		var user_id = <%=user_id %>;
		var pagenum = '16';
		var dFileNum = 0;
		var orderColumn = '';
		var orderValue = '';
		if(intpage == '' || intpage == null){intpage = 1}
		
		function windowonload(){
			document.getElementById("jiazai").style.top = document.body.clientHeight/3;
			document.getElementById("jiazai").style.left = document.body.clientWidth/3;
			document.getElementById("jiazai").style.display = "block";
			document.getElementById("blackdiv").style.display = "block";
			
			document.getElementById("right").style.width = document.body.clientWidth-5;
			document.getElementById("divgroup").style.height = document.body.clientHeight-90;
			document.getElementById("tdindex").style.height = document.body.clientHeight-90;
			document.getElementById("tdindex").style.width = document.body.clientWidth-154;
			document.getElementById("divindex").style.width = document.body.clientWidth-151;
			document.getElementById("divindex").style.height = document.body.clientHeight-50;
			document.getElementById("waigroup").style.height = document.body.clientHeight-50;
			if(first == "shi"){
				FileExpressPageBo.getFirstPage(<%=user.getUser_id() %>,pagenum,ListUser);
			}
		}
		
		var groupNum = 0;
		var fu = null;
		function Group(fuzhi){
			var divgroup = document.getElementById("divgroup");
			fu = fuzhi;
			groupNum = fu.length/2;
			var liebiaoGroup = '<table id="grouptable" border="0" width="129px;" cellspacing="0" cellpadding="0">';
			var i = 0;
			for(var a=0;a<fu.length;a=a+2){
				if(fu[a] == group_id){
					if(fu[a+1].length>8){
						liebiaoGroup += '<tr id="group'+i+'" class=\"trGroupColor\" onclick="GroupListUser(\''+fu[a]+'\')" onmouseup=\"ClickGroup('+i+');\"><td width="23px" height="24px" align="center"><img src="<%=basePath%>images/conicon.gif"/></td><td height="24px" valign="middle" style=\"font-weight: bold\"><a id=\"groupA'+i+'\" title=\"'+fu[a+1]+'\">'+fu[a+1].substring(0,8)+'</a></td></tr>';
					}else{
						liebiaoGroup += '<tr id="group'+i+'" class=\"trGroupColor\" onclick="GroupListUser(\''+fu[a]+'\')" onmouseup=\"ClickGroup('+i+');\"><td width="23px" height="24px" align="center"><img src="<%=basePath%>images/conicon.gif"/></td><td height="24px" valign="middle" style=\"font-weight: bold\"><a id=\"groupA'+i+'\">'+fu[a+1]+'</a></td></tr>';
					}
				}else{
					if(fu[a+1].length>8){
						liebiaoGroup += '<tr id="group'+i+'" onmouseover=\'this.className=\"trGroupColor\"\' onmouseout=\'this.className=\"\"\' onclick="GroupListUser(\''+fu[a]+'\')" onmouseup=\"ClickGroup('+i+');\"><td width="23px" height="24px" align="center"><img src="<%=basePath%>images/conicon.gif"/></td><td height="24px" valign="middle"><a id=\"groupA'+i+'\" title=\"'+fu[a+1]+'\">'+fu[a+1].substring(0,8)+'</a></td></tr>';
					}else{
						liebiaoGroup += '<tr id="group'+i+'" onmouseover=\'this.className=\"trGroupColor\"\' onmouseout=\'this.className=\"\"\' onclick="GroupListUser(\''+fu[a]+'\')" onmouseup=\"ClickGroup('+i+');\"><td width="23px" height="24px" align="center"><img src="<%=basePath%>images/conicon.gif"/></td><td height="24px" valign="middle"><a id=\"groupA'+i+'\">'+fu[a+1]+'</a></td></tr>';
					}
				}
				i++;
			}
			if(fu.length>30){
				document.getElementById("zushang").style.display = "block";
				document.getElementById("zuxia").style.display = "block";
				document.getElementById("divgroup").style.height = document.body.clientHeight-110;
			}else{
				document.getElementById("zushang").style.display = "none";
				document.getElementById("zuxia").style.display = "none";
			}
			liebiaoGroup += '</table>';
			divgroup.innerHTML= liebiaoGroup;
		}
        
        var groupA = -1;
        function ClickGroup(i){
			if(groupA!=-1)
			document.getElementById("group"+groupA).onmouseout = function(){this.className=''};
        	for(var a = 0 ; a<groupNum;a++ ){
				var b = document.getElementById("group"+a);
				var c = document.getElementById("groupA"+a);
				if(a == i){
					b.className="trGroupColor";
					c.style.fontWeight="bold";
					b.onmouseout = null;
					groupA = a;
				}else{
					c.style.fontWeight="100";
					b.className='';
				}
			}
        }
		function init(page){
			intpage=page;
			FileExpressPageBo.getGotoPage(group_id,intpage,pagenum,orderColumn,orderValue,ListUser);
		}
		
		function renpaixu(){
			Ext.MessageBox.show({
		        title: '提示框',
		        msg:'选择日期排序方式',
		        width: 300,
		        buttons: { ok: "升序", no:"降序",cancel:'关闭' },  
		        fn: function(btn, text) {
		       		orderColumn = 'userName';
		       		if (btn == 'ok') {
		       			orderValue = 'asc';
		            }else if(btn == 'no'){
		       			orderValue = 'desc';
		            }
		            init(1);
		        }
		    });
		}
		
		function shijianpaixu(){
			Ext.MessageBox.show({
		        title: '提示框',
		        msg:'选择发送人排序方式',
		        width: 300,
		        buttons: { ok: "升序", no:"降序",cancel:'关闭' },  
		        fn: function(btn, text) {
		       		orderColumn = 'datetime';
		       		if (btn == 'ok') {
		       			orderValue = 'asc';
		            }else if(btn == 'no'){
		       			orderValue = 'desc';
		            }
		            init(1);
		        }
		    });
		}
		
		function ListUser(addressListUser){
			if(first == "shi"){
				FileExpressPageBo.getGroup(getGroup_id);
				first = "fou";
			}
			var divindex = document.getElementById("divindex");
			var liebiaoUser = '<table class="p_06" width=\"100%\" border=\"0\" cellspacing=\"0\"><tr><th width=\"4%\" style="text-align: center;">全选</th><th width=\"22%\" style="text-align: center;">文件名称</th><th width=\"10%\" style="text-align: center;">发送人(<a href="javascript:renpaixu()">排序</a>)</th><th width=\"15%\" style="text-align: center;">发送时间(<a href="javascript:shijianpaixu()">排序</a>)</th><th width=\"5%\" style="text-align: center;">级别</th><th width=\"10%\" style="text-align: center;">大小</th><th width=\"5%\" style="text-align: center;">备注</th><th width=\"10%\" style="text-align: center;">下载/重命名</th></tr>';
			if(addressListUser.length != 0){
				dFileNum = addressListUser.length;
				liebiaoUser = '<form name=checkboxform><table class="p_06" width=\"100%\" border=\"0\" cellspacing=\"0\"><tr><th width=\"4%\" style="text-align: center;"><a href="javaScript:switchAll('+addressListUser.length+')">全选</a></th><th width=\"22%\" style="text-align: center;">文件名称</th><th width=\"10%\" style="text-align: center;">发送人(<a href="javascript:renpaixu()">排序</a>)</th><th width=\"15%\" style="text-align: center;">发送时间(<a href="javascript:shijianpaixu()">排序</a>)</th><th width=\"5%\" style="text-align: center;">级别</th><th width=\"10%\" style="text-align: center;">大小</th><th width=\"5%\" style="text-align: center;">备注</th><th width=\"10%\" style="text-align: center;">下载/重命名</th></tr>';
				for(var i=0;i<addressListUser.length;i++){
					var id = addressListUser[i].id;
					var datetime = addressListUser[i].datetime;
					var expressLevel = addressListUser[i].expressLevel;
					if(expressLevel == '0')expressLevel='普通';else expressLevel='加急'
					var expressUser = addressListUser[i].expressUser;if(expressUser==null || expressUser == '')expressUser='&nbsp;'; else expressUser = retrunString(expressUser,11,11);
					var expressUser1 = addressListUser[i].expressUser;if(expressUser1==null || expressUser1 == '')expressUser1='';
					var remark = addressListUser[i].remark;
					if(remark==null || remark==''){
						remark='无备注';
					}else{ 
						remark=remark.replace(/'/g,"\\'");
					}
					var remark1 = addressListUser[i].remark;if(remark=='无备注')remark1='无'; else remark1='备注';
					var fileSize = addressListUser[i].fileSize;
					if(fileSize>1048576)fileSize = (fileSize/1048576).toFixed(2)+"M"; else fileSize = (fileSize/1024).toFixed(1)+"KB";
					addressListUser[i].fileName = addressListUser[i].fileName.replace(/'/g,'＇');
					var name = retrunString(addressListUser[i].fileName,12,15);
					var name1 = addressListUser[i].fileName;
					if(user_id != null && user_id != '' && user_id == addressListUser[i].id){
						liebiaoUser += '<tr id="beizhutrid'+i+'" class=\"trBgColor\"><td><input type="checkbox" name="dFile'+i+'" id=\''+id+'\'/></td><td><a title=\"'+name1+'\" href="javaScript:downloadfile(\''+id+'\',\''+addressListUser[i].fileName+'\','+addressListUser[i].fileSize+');">'+name+'</a></td><td><a title=\"'+expressUser1+'\">'+expressUser+'</td><td><a title=\"'+datetime+'\">'+datetime+'</a></td><td><a title=\"'+expressLevel+'\">'+expressLevel+'</a></td><td><a title=\"'+fileSize+'\">'+fileSize+'</a></td><td id="beizhuid'+i+'"><a onclick="javascript:beizhuxian(\''+remark+'\','+i+');">'+remark1+'</a></td><td><a href="javaScript:downloadfile(\''+id+'\',\''+addressListUser[i].fileName+'\','+addressListUser[i].fileSize+');">下载</a>\|<a href="javaScript:updateFileName('+id+');">重命名</a></td></tr>';
					}else{
						liebiaoUser += '<tr id="beizhutrid'+i+'" onmouseover=\'this.className=\"trBgColor\"\' onmouseout=\'this.className=\"\"\'><td><input type="checkbox" name="dFile'+i+'" id=\''+id+'\'/></td>';
						liebiaoUser += '<td><div id="fNamediv'+i+'"><a title=\"'+name1+'\" href="javaScript:downloadfile(\''+id+'\',\''+addressListUser[i].fileName+'\','+addressListUser[i].fileSize+');">'+name+'</a></div>';
						liebiaoUser += '<div id="fNamedivF'+i+'" style="display:none"><input id="rlinput'+i+'" size="28" type="text" style="text-align: center"></td></div>';
						liebiaoUser += '<td><a title=\"'+expressUser1+'\">'+expressUser+'</a></td><td><a title=\"'+datetime+'\">'+datetime+'</a></td><td><a title=\"'+expressLevel+'\">'+expressLevel+'</a></td>';
						liebiaoUser += '<td><a title=\"'+fileSize+'\">'+fileSize+'</a></td><td id="beizhuid'+i+'"><a onclick="javascript:beizhuxian(\''+remark+'\','+i+');">'+remark1+'</a></td>';
						liebiaoUser += '<td><div id="chongdiv'+i+'"><a href="javaScript:downloadfile(\''+id+'\',\''+addressListUser[i].fileName+'\','+addressListUser[i].fileSize+')">下载</a><a>\|</a><a href="javaScript:chongming('+i+',\''+name1+'\');">重命名</a></div>';
						liebiaoUser += '<div id="chongdivF'+i+'" style="display:none"><a href="javaScript:chongmingTrue('+i+',\''+id+'\',\''+addressListUser[i].fileName+'\','+addressListUser[i].fileSize+');" style="color: red;" >确定</a>&nbsp;&nbsp;<a href="javaScript:xiaoshichong('+i+',\''+addressListUser[i].fileName+'\');" style="color: red;" >取消</a></div></td></tr>';
					}
				}
			
				liebiaoUser += '<tr align=\"center\"><td colspan="8"><div class="page" id="pagediv">';
				FileExpressPageBo.getPagecount({
					callback:function(pagecount) {
						//下拉框
						if(first == 'delete' && intpage == pagecount+1){
							intpage = pagecount;
							first = null;
						}
			             var select="<select name=\"sel\">";
			             for(var i=0;i<pagecount;i++){
			                if((i+1)==intpage)
			              select+="<option value=\""+(i+1)+"\" selected>"+(i+1)+"</option>";
			              else
			              select+="<option value=\""+(i+1)+"\">"+(i+1)+"</option>";              
			             }
			             select+="</select>";
			             
			             //链接条
			             var linkstr="";
			             if(intpage>pagecount)intpage=pagecount;
			             
			             if(intpage>1){
			                linkstr+="&nbsp;&nbsp;<a href=\"javascript:init("+(Number(intpage)-1)+")\">上一页</a>";
			             }
			             if(intpage<pagecount){
			                linkstr+="&nbsp;&nbsp;<a href=\"javascript:init("+(Number(intpage)+1)+")\">下一页</a>";
			             }
			             
			             //按钮
			             var btn="<input type='button' value='转到' onclick='init(sel.value)'/>";
			             
			             //  第XXX页/共XXX页
			             var mix="<a>共"+pagecount+"页,当前为第"+intpage+"页</a>";
			             
			             divindex.innerHTML=liebiaoUser+mix+linkstr+'		'+select+'			'+btn;
			             divindex.innerHTML+="</div></td></tr></table></form>";
					}
				});
				document.getElementById("jiazai").style.display = "none";
				document.getElementById("blackdiv").style.display = "none";
			}else{
				if(first == 'delete'){
					FileExpressPageBo.getLastPage(group_id,pagenum,orderColumn,orderValue,ListUser);
					first = null;
				}
				liebiaoUser += '</table></form>';
				dFileNum = 0;
			}
			divindex.innerHTML= liebiaoUser;
			document.getElementById("jiazai").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
			huifu();
		}
		
		function switchAll(i) {
			var box = eval("document.checkboxform.dFile0");
			var bl = false;
			if(box.checked == false){
				bl = true;
			}
			for (var j = 0; j <= i-1; j++) {
				box = eval("document.checkboxform.dFile" + j); 
				box.checked = bl;
			}
		}
		
		function chongming(i,fileName){
			document.getElementById('chongdiv'+i+'').style.display = "none";
			document.getElementById('chongdivF'+i+'').style.display = "block";
			document.getElementById('fNamediv'+i+'').style.display = "none";
			document.getElementById('fNamedivF'+i+'').style.display = "block";
			document.getElementById('rlinput'+i+'').value = fileName.split(".")[0];
		}
		
		function xiaoshichong(i,fileName){
			document.getElementById('chongdiv'+i+'').style.display = "block";
			document.getElementById('chongdivF'+i+'').style.display = "none";
			document.getElementById('fNamediv'+i+'').style.display = "block";
			document.getElementById('fNamedivF'+i+'').style.display = "none";
			document.getElementById('rlinput'+i+'').value = fileName.split('.')[0];
		}
		
		function chongmingTrue(i,id,fileName,fileSize){
			var newName = document.getElementById('rlinput'+i+'').value;
			if(!/^[^\/:*?"'<>|.]*$/.test(newName)){
  				Ext.MessageBox.alert('提示框','<nobr>文件名不能包含下列任何字符之一:<br/> \/:*?"\'<>|.<br/><br/>请检查输入！</nobr>');  
			 	return; 
  			}
			if(fileName!=null && fileName!=''){
				if(fileName.indexOf('.')!=-1){
					newName += '.'+fileName.split('.')[1];
				}
			}
			FileExpressFileBo.updateFileName(id,newName,'<%=fileUploadPath %>');
			
			var name = retrunString(newName,12,15);
			document.getElementById('fNamediv'+i+'').innerHTML = '<a title=\"'+newName+'\" href="javaScript:downloadfile(\''+id+'\',\''+newName+'\','+fileSize+');">'+name+'</a>';
			document.getElementById('chongdiv'+i+'').innerHTML = '<a href="javaScript:downloadfile(\''+id+'\',\''+newName+'\','+fileSize+')">下载</a><a>\|</a><a href="javaScript:chongming('+i+',\''+newName+'\');">重命名</a>';
			xiaoshichong(i,newName);
			Ext.MessageBox.alert('提示框','<nobr>重命名成功</nobr>');
		}
		
		function downloadfile(id,filename,fileSize){
			document.getElementById("blackdiv").style.display = "block";
			document.getElementById("fileDownloadDiv").style.top = document.body.clientHeight/4;
			document.getElementById("fileDownloadDiv").style.left = document.body.clientWidth/5;
			document.getElementById("fileDownloadDiv").style.display = "block";
			document.getElementById("xiazaidiv").innerHTML = '您现在要下载的文件是:'+filename;
			document.getElementById("filedown").href='<%=basePath %>tjsinfo/tjsoa/fileExpress/ioAction.do?id='+id+'';
		}

		function xiaoshiFileDownloadDiv(){
			document.getElementById("fileDownloadDiv").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
		}
		
		function getGroup_id(Group_id){
			group_id = Group_id;
			FileExpressGroupBo.getGroup(<%=user.getUser_id() %>,Group);
		}
		function GroupListUser(groupid){
			group_id = groupid;
			user_id = '';
			intpage = 1;
			FileExpressPageBo.getGotoPage(groupid,1,pagenum,orderColumn,orderValue,ListUser);
		}
		
		function xianshigroup(){
			var Objxy=getXY(document.getElementById("groupbianji"));
			document.getElementById("groupcaozuo").style.top = Objxy.y+26;
			document.getElementById("groupcaozuo").style.display = "block";
		}
		
		function xiaoshigroup(){
			if(!groupcaozuo.contains(window.event.srcElement) && !groupbianji.contains(window.event.srcElement)){
				document.getElementById("groupcaozuo").style.display = "none";
			}
		}
		
		function xiaoshigroup1(){
			if(groupcaozuo.contains(window.event.srcElement)){
				document.getElementById("groupcaozuo").style.display = "none";
			}
		}
		
		function getXY(Obj) {
			var sumTop = 0, sumLeft = 0;
			while(Obj != document.body){
			sumLeft += Obj.offsetLeft;sumTop += Obj.offsetTop;Obj = Obj.offsetParent;
			} 
			return {x:sumLeft, y:sumTop};
		} 
		
		function xianshiInsertGroup(){
			document.getElementById("insertGroup").style.top = document.body.clientHeight/4;
			document.getElementById("insertGroup").style.left = document.body.clientWidth/5;
			document.getElementById("insertGroupName").value = '';
			document.getElementById("insertGroup").style.display = "block";
			document.getElementById("blackdiv").style.display = "block";
		}
		
		function xiaoshiInsertGroup(){
			document.getElementById("insertGroup").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
		}
		
		function insertGroup(){
			var groupName = document.getElementById("insertGroupName").value;
			var i = yanzhenggroupName(groupName);
			if(i != 'error'){
				FileExpressGroupBo.insertGroup(groupName,<%=user.getUser_id() %>,returnGroupCaoZuo);
				xiaoshiInsertGroup();
				Ext.MessageBox.alert('提示框','<nobr>新建成功</nobr>');
			}else{
				document.getElementById("insertGroupName").value = '';
			}
		}
		
		var re_groupname = /^[\w\u4E00-\u9FA5]{1,25}$/;
		function yanzhenggroupName(groupName){
			if(groupName == '' || groupName == null){
				Ext.MessageBox.alert('提示框','<nobr>文件夹名不能为空</nobr>');
				return 'error';
			}
			if(groupName == '我的接收文件夹'){
				Ext.MessageBox.alert('提示框','<nobr>文件夹名\"'+groupName+'\"是系统保留的联系人组名，不允许使用该组名</nobr>');
				return 'error';
			}
			for(var a=0;a<fu.length;a=a+2){
				if(fu[a+1] == groupName){
					Ext.MessageBox.alert('提示框','<nobr>文件夹名已经存在</nobr>');
					return 'error';
				}
			}
			if(groupName.length>25){  //中文，字母，数字，下划线
				Ext.MessageBox.alert('提示框','<nobr>新建文件夹名不能超过25个字</nobr>');
				return 'error';
			}
			if(!re_groupname.test(groupName)){  //中文，字母，数字，下划线
				Ext.MessageBox.alert('提示框','<nobr>新建文件夹名含有非法字符</nobr>');
				return 'error';
			}
		}
		
		function returnGroupCaoZuo(str){
			if(str == 'ok'){
				FileExpressGroupBo.getGroup(<%=user.getUser_id() %>,Group);
			}
		}
		
		function xianshiUpdateGroup(){
			document.getElementById("updateGroupIndexDiv").style.top = document.body.clientHeight/6;
			document.getElementById("updateGroupIndexDiv").style.left = document.body.clientWidth/8;
			document.getElementById("blackdiv").style.display = "block";
			document.getElementById("updateGroupIndexDiv").style.display = "block";
			updateGroupName();
		}
		
		function xiaoshiUpdateGroup(){
			document.getElementById("updateGroupIndexDiv").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
			document.getElementById("newGroupName").value = '';
		}
		
		function updateGroupName(){
			var updateGroup = '<table width="100%" class="researchtab"><tr>';
			var i = 0;
			for(var a=0;a<fu.length;a=a+2){
				if(fu[a+1] == '我的接收文件夹'){
					continue;
				}else{
					if(fu[a+1].length>=5){
						updateGroup += '<td width="30%"><input name="groupidradio" type="radio" alt="'+fu[a+1]+'" id="groupidradio" value="'+fu[a]+'" onclick="newGroupName(this)"/><a title=\"'+fu[a+1]+'\">'+fu[a+1].substring(0,6)+'</a></td>';
					}else{
						updateGroup += '<td width="30%"><input name="groupidradio" type="radio" alt="'+fu[a+1]+'" id="groupidradio" value="'+fu[a]+'" onclick="newGroupName(this)"/>'+fu[a+1]+'</td>';
					}
				}
				i++;
				if(i%3 == 0){
					updateGroup += '</tr><tr>';
				}else if(a == fu.length-1){
					updateGroup += '</tr>';
				}
			}
			var updateGroupDiv = document.getElementById("updateGroupDiv");
			updateGroupDiv.innerHTML = updateGroup;
		}
		
		function updateGroup(){
			var a = 0;
			var id = 0;
			if(document.all('groupidradio')!=null){
				if(document.all('groupidradio').length != null && document.all('groupidradio').length > 0){
					for(i=0;i<document.all('groupidradio').length;i++){
						if(document.all('groupidradio')[i].checked){
							a = 1;
							id = document.all('groupidradio')[i].value;
						}
					}
				}else{
					if(document.getElementById('groupidradio').checked){
						a = 1;
						id = document.getElementById('groupidradio').value;
					}
				}
			}
			if(a == 0){Ext.MessageBox.alert('提示框','<nobr>请选择文件夹</nobr>');return;}
			var groupName = document.getElementById("newGroupName").value;
			var i = yanzhenggroupName(groupName);
			if(i != 'error'){
				FileExpressGroupBo.updateGroup(id,groupName,<%=user.getUser_id() %>,returnGroupCaoZuo);
				xiaoshiUpdateGroup();
				Ext.MessageBox.alert('提示框','<nobr>修改成功</nobr>');
			}
		}
		
		function newGroupName(str){
			document.getElementById('newGroupName').value = str.alt;
		}
		
		
		function xianshiDeleteGroup(){
			document.getElementById("deleteGroupIndexDiv").style.top = document.body.clientHeight/5;
			document.getElementById("deleteGroupIndexDiv").style.left = document.body.clientWidth/6;
			document.getElementById("blackdiv").style.display = "block";
			document.getElementById("deleteGroupIndexDiv").style.display = "block";
			deleteGroupName();
		}
		
		function xiaoshiDeleteGroup(){
			document.getElementById("deleteGroupIndexDiv").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
		}
		
		function deleteGroupName(){
			var deleteGroup = '<table width="100%" class="researchtab"><tr>';
			var i = 0;
			for(var a=0;a<fu.length;a=a+2){
				if(fu[a+1] == '我的接收文件夹'){
					continue;
				}else{
					if(fu[a+1].length>=5){
						deleteGroup += '<td width="30%"><input name="groupidradio" type="radio" alt="'+fu[a+1]+'" id="groupidradio" value="'+fu[a]+'"/><a title=\"'+fu[a+1]+'\">'+fu[a+1].substring(0,6)+'</a></td>';
					}else{
						deleteGroup += '<td width="30%"><input name="groupidradio" type="radio" alt="'+fu[a+1]+'" id="groupidradio" value="'+fu[a]+'"/>'+fu[a+1]+'</td>';
					}
				}
				i++;
				if(i%3 == 0){
					deleteGroup += '</tr><tr>';
				}else if(a == fu.length-1){
					deleteGroup += '</tr>';
				}
			}
			var deleteGroupDiv = document.getElementById("deleteGroupDiv");
			deleteGroupDiv.innerHTML = deleteGroup;
		}
		
		var deleteGroupId = '';
		function deleteGroup(){
			var a = 0;
			var id = 0;
			if(document.all('groupidradio')!=null){
				for(i=0;i<document.all('groupidradio').length;i++){
					if(document.all('groupidradio')[i].checked){
						a = 1;
						id = document.all('groupidradio')[i].value;
						deleteGroupId = id;
						if(i == groupA-1){groupA = 0}
					}
				}
				if(document.getElementById('groupidradio').checked){
					a = 1;
					id = document.getElementById('groupidradio').value;
					deleteGroupId = id;
				}
			}
			if(a == 0){Ext.MessageBox.alert('提示框','<nobr>请选择文件夹</nobr>');return;}
			shaodeng();
			FileExpressGroupBo.FirstDeleteGroup(id,'<%=fileUploadPath %>',firstDeleteGroup);
			xiaoshiDeleteGroup();
		}
		
		function firstDeleteGroup(str){
			if(str == "haveUser"){
				Ext.MessageBox.confirm('提示框', '您删除文件夹的时候会一并删除里面内的所有文件，请确认是否继续操作？', function(btn){
					if(btn=='yes'){
						FileExpressGroupBo.deleteGroup(deleteGroupId,'<%=fileUploadPath %>',returnDeleteGroupCaoZuo);
						deleteGroupId = '';
					}else{
						huifu();
					}
				});
			}else{
				returnDeleteGroupCaoZuo();
			}
		}
		
		function deleteListUser(){
			var a = false;
			var ids = '';
			for (var j = 0; j <= dFileNum-1; j++) {
				box = eval("document.checkboxform.dFile" + j);
				if(box.checked == true){
					a = true;
					ids += box.id+",";
				}
			}
			if(a){
				Ext.MessageBox.confirm('提示框', '您是否确认删除文件？', function(btn){
					if(btn=='yes'){
						shaodeng();
						FileExpressFileBo.deleteFile(ids,intpage,'<%=fileUploadPath %>',{
							callback:function(page) {
								intpage=page;
								FileExpressPageBo.getGotoPage(group_id,intpage,pagenum,orderColumn,orderValue,ListUser);
							}
						});
					}
				});
			}else{
				Ext.MessageBox.alert('提示框','<nobr>请选择要删除的文件</nobr>');
			}
		}
		
		function returnDeleteGroupCaoZuo(){
			Ext.MessageBox.alert('提示框','<nobr>删除成功</nobr>');
			first = 'shi';
			FileExpressPageBo.getFirstPage(<%=user.getUser_id() %>,pagenum,ListUser);
		}
		function shaodeng(){
			document.getElementById("shaodeng").style.top = document.body.clientHeight/3;
			document.getElementById("shaodeng").style.left = document.body.clientWidth/3;
			document.getElementById("shaodeng").style.display = "block";
			document.getElementById("blackdiv").style.display = "block";
		}
		
		function huifu(){
			document.getElementById("shaodeng").style.display = "none";
			document.getElementById("blackdiv").style.display = "none";
		}
	</script>
	<%-- 向上向下滑动--%>
	 <script type="text/JavaScript">
var sh;
preLeft=0; currentLeft=0; stopscroll=false; getlimit=0;preTop=0; currentTop=0;
function scrollLeft()
{
	var marquees = document.getElementById("divgroup");
	if(stopscroll==true) return;
	preLeft=marquees.scrollTop;
	marquees.scrollTop+=2;
	if(preLeft==marquees.scrollTop)
	{
		//marquees.scrollLeft=templayer.offsetWidth-marqueesWidth+1;
	}
}

function scrollRight()
{
	var marquees = document.getElementById("divgroup");
	if(stopscroll==true) return;

	preLeft=marquees.scrollTop;
	marquees.scrollTop-=2;
	if(preLeft==marquees.scrollTop)
	{
		if(!getlimit)
		{
			marquees.scrollLeft=templayer.offsetWidth*2;
			getlimit=marquees.scrollLeft;
		}
		marquees.scrollLeft-=1;
	}
}

function Left()
{
	stopscroll = false;
	sh = setInterval("scrollLeft()",30);
}

function Right()
{
	stopscroll = false;
	sh = setInterval("scrollRight()",30);
}

function StopScroll()
{
	stopscroll = true;
	clearInterval( sh );
}
</script>
<%-- 宽窄屏截字符 --%>
<script type="text/javascript">
	function retrunString(str,k,z){
		if(screen.width <= 1024){
			str = str.substring(0,z);
		}else{
			str = str.substring(0,k);
		}
		return str;
	}
	
	function ifsubmit(str,k,z){
		if(screen.width <= 1024){
			if(str.length > z)return false; else return true;
		}else{
			if(str.length > k)return false; else return true;
		}
	}
</script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath %>fileExpress/js/selectusercheck.js"></script>
  </head>
  
  <body>
  <form action="<%=basePath %>tjsinfo/tjsoa/fileExpress/zhuanFile.do" name="zhuanForm" id="zhuanForm" method="post">
	<input type="hidden" name="node2" id="node2" value=""/>
    <input id="basePath" value="<%=basePath%>" type="hidden"/>
	<input type="hidden" id="zhuan_userid" name="zhuan_userid" value=""/>
	<input type="hidden" id="zhuan_username" name="zhuan_username" value=""/>
	<input type="hidden" id="zhuan_fileid" name="zhuan_fileid" value=""/>
</form>
    <div id="right" style="z-index: 19;">
      	<div id="menu" style="padding-top:4px;"><a id="windowOpen" style="display: none;">&nbsp;</a></div>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-right:#CCCCCC solid 1px;">
          <tr>
            <td width="132px;" valign="top" align="left" height="100%">
              <div class="conren" style="height: 450px" id="waigroup">
                <div class="h"><table width="132px;" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="20%" align="center"><img src="<%=basePath%>images/zuicon.png"/></td>
                        <td align="left">文件夹<br/></td>
                      </tr>
                    </table>
                </div>
                <div id="zushang" class="zuxia" onmouseout=StopScroll() onmouseover=Right() style='cursor:pointer;display: none;'></div>
                  <table width="132px;" height="390px" border="0" cellspacing="0" cellpadding="0" id="grouptable">
                    <tr height="80%" valign="top">
                      <td>
                      	<div id="divgroup"></div>
                      	<DIV id=templayer style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"></DIV>
                      </td>
                    </tr>
                </table>
                <div id="zuxia" class="zushang" onmouseout=StopScroll() onmouseover=Left() style='cursor:pointer;display: none;'></div>
              </div>
            </td>
            <td valign="top" id="tdindex">
               <div id="divindex" class="contab" style="height: 98%;width: 99%">
              </div>
            </td>
          </tr>
      </table>
</div>
<%-- 下面为隐藏层
groupcaozuo -- 组操作层，选中组操作显示此层
insertGroup -- 新增组显示层
blackdiv -- 弹出新层时，周围的阴影层
 --%>
<div class="hiddiv" id="groupcaozuo" onmouseover="xianshigroup()" onmouseout="xiaoshigroup1()">
	<table background="<%=basePath%>images/s_04.gif" width="100%" height="100%">
	  <tr  onclick='xianshiInsertGroup();'><td style="cursor: hand">&nbsp;<img src="<%=basePath%>images/s_01.gif" />&nbsp;新增文件夹</td></tr>
	  <tr  onclick="xianshiUpdateGroup();"><td style="cursor: hand">&nbsp;<img src="<%=basePath%>images/s_02.gif" />&nbsp;修改文件夹</td></tr>
	  <tr  onclick="xianshiDeleteGroup();"><td style="cursor: hand">&nbsp;<img src="<%=basePath%>images/s_03.gif" />&nbsp;删除文件夹</td></tr>
	</table>
</div>

<div id="blackdiv" class="black_overlays">
	<iframe style="width:100%;height:100%;filter:alpha(opacity=0);-moz-opacity:0"></iframe>
</div>

<div class="insertGroup" id="insertGroup">
	<table width="478" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td height="24" align="left" background="<%=basePath%>images/small_07.gif">
                 <table width="99%" border="0" cellspacing="0" cellpadding="0">
				     <tr>
				         <td width="6%" align="center" style="padding-top:3px;"><img src="images/icon_06.gif" /></td>
				         <td width="88%" style="color:#FFFFFF; font-weight:bold;padding-top:3px">新建文件夹</td>
				         <td width="6%" valign="bottom">
							<div class="cha">
								<img src="<%=basePath%>images/cha.gif"
									onclick="javaScript:xiaoshiInsertGroup();"
											style="cursor: hand" />
							</div>
						</td>
				     </tr>
				</table>
                 </td>
               </tr>
                <tr>
                 <td height="109" class="zz">
                     <table width="90%" height="80%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                      <tr>
                        <td width="10%">&nbsp;&nbsp;</td>
                        <td width="20%" align="center">文件夹名称：</td>
                        <td width="70%" align="left"><input name="insertGroupName" type="text" size="40" class="textinput"/></td>
                      </tr>
                       <tr>
                        <td colspan="3" style="border-top:1px #CFCFD1 solid" align="center"><a href="javaScript:insertGroup();"><img src="<%=basePath%>images/baocun.gif" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javaScript:xiaoshiInsertGroup();"><img src="<%=basePath%>images/qx.gif" /></a>
                        </td>
                       </tr>
                    </table>
                 </td>
               </tr>
             </table>
</div>
<div id="updateGroupIndexDiv" class="updateGroupIndexDiv">
    <table width="478" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td background="<%=basePath%>images/small_07.gif" height="24" align="left">
                 <table width="99%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="8%" style="padding-left:15px; padding-top:3px;"><img src="<%=basePath%>images/icon_07.gif" /></td>
                        <td width="86%" style="color:#FFFFFF; font-weight:bold;padding-top:3px">修改文件夹名称</td>
                        <td width="6%" valign="bottom">
							<div class="cha">
								<img src="<%=basePath%>images/cha.gif"
									onclick="javaScript:xiaoshiUpdateGroup();"
											style="cursor: hand" />
							</div>
						</td>
                      </tr>
                    </table>
                 </td>
               </tr>
               <tr>
                 <td align="center" class="zz">
                     <table width="90%" height="180" border="0" cellspacing="0" cellpadding="0" >
                      <tr><td colspan="3" align="left">
                       <div id="updateGroupDiv">
                       </div>
                      </td>
                      </tr>
                      <tr>
                        <td width="20%">&nbsp;</td>
                        <td width="13%">新名称：</td>
                        <td width="67%" align="left"><input name="newGroupName" id="newGroupName" type="text" size="30" class="textinput"/></td>
                      </tr>
                      <tr>
                        <td colspan="3">&nbsp;</td>
                      </tr>
                      <tr><td colspan="3" style="border-top:1px #CFCFD1 solid">&nbsp;</td></tr>
                      <tr>
                        <td colspan="3" align="center"><a href="javaScript:updateGroup();"><img src="<%=basePath%>images/xiugai.gif" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javaScript:xiaoshiUpdateGroup();"><img src="<%=basePath%>images/qx.gif" />
                        </td>
                      </tr>
                      <tr>
                        <td colspan="3">&nbsp;</td>
                     </tr>
                    </table>
</td>
</tr>
</table>
</div>
<div id="deleteGroupIndexDiv" class="deleteGroupIndexDiv">
    <table width="342" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td background="images/small_04.gif" height="25" align="left">
                 <table width="99%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="8%" style="padding-left:15px; padding-top:3px;"><img src="<%=basePath%>images/icon_07.gif" /></td>
                        <td width="86%" style="padding-left:10px; color:#FFFFFF; font-weight:bold;padding-top:3px">删除文件夹</td>
                        <td width="6%" valign="bottom">
							<div class="cha">
								<img src="<%=basePath%>images/cha.gif"
									onclick="javaScript:xiaoshiDeleteGroup();"
											style="cursor: hand" />
							</div>
						</td>
                      </tr>
                    </table>
                 </td>
               </tr>
               <tr>
                 <td align="center" class="zz">
                     <table width="90%" height="180" border="0" cellspacing="0" cellpadding="0">
                      <tr><td colspan="3" align="left">
                       <div id="deleteGroupDiv"></div>
                      </td>
                      </tr>
                      <tr><td colspan="3" style="border-top:1px #CFCFD1 solid">&nbsp;</td></tr>
                      <tr>
                        <td colspan="3" align="center"><a href="javaScript:deleteGroup();"><img src="<%=basePath%>images/shanchu.gif" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javaScript:xiaoshiDeleteGroup();"><img src="<%=basePath%>images/qx.gif" />
                        </td>
                       </tr>
                      <tr>
                        <td colspan="3">&nbsp;</td>
                     </tr>
                    </table>
                 </td>
               </tr>
             </table>
</div>

<div class="insertGroup" id="jiazai">
	<table width="478" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td height="24" align="left">
                 <b>页面加载中,请稍候....</b>
                 </td>
               </tr>
             </table>
</div>
<div class="insertGroup" id="shaodeng">
	<table width="478" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td height="24" align="left">
                 <b>请求正在处理中,请稍候....</b>
                 </td>
               </tr>
             </table>
</div>
<input type="hidden" id="beizhuid"/>
<div id="windowdiv" class="window" style="display: none">
			<div id="windowTop" class="windowTop">
				<div id="windowTopContent" class="windowTopContent">
					文件备注
				</div>
				<img id="windowClose"
					src="<%=basePath%>fileExpress/images/window_close.jpg" onclick="beizhuguan();" class="windowClose"/>
			</div>
			<div id="windowBottom" class="windowBottom">
				<div id="windowBottomContent" class="windowBottomContent" style="width: 500"></div>
			</div>
			<div id="windowContent" style="background: #D9E8F1;" class="windowContent">
				<div style="padding-top: 20px; padding-left: 20px;width: 90%" id="remarkdiv">
				</div>
			</div>
		<img id="windowResize" src="<%=basePath%>fileExpress/images/window_resize.gif" class="windowResize"/>
</div>

<div class="insertGroup" id="fileDownloadDiv">
	<table width="478" border="0" cellpadding="0" cellspacing="0" >
               <tr>
                 <td height="24" align="left" background="<%=basePath%>images/small_07.gif">
                 <table width="99%" border="0" cellspacing="0" cellpadding="0">
				     <tr>
				         <td width="6%" align="center" style="padding-top:3px;"><img src="images/icon_06.gif" /></td>
				         <td width="88%" style="color:#FFFFFF; font-weight:bold;padding-top:3px">下载文件（如下载有误，请右键单击"下载"—>"目标另存为"进行操作）</td>
				         <td width="6%" valign="bottom">
							<div class="cha">
								<img src="<%=basePath%>images/cha.gif"
									onclick="javaScript:xiaoshiFileDownloadDiv();"
											style="cursor: hand" />
							</div>
						</td>
				     </tr>
				</table>
                 </td>
               </tr>
                <tr>
                 <td height="109" class="zz">
                     <table width="90%" height="80%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                     <tr>
                      <td align="center" colspan="2"><div id="xiazaidiv"></div></td>
                      </tr>
                      <tr>
                      <td align="right"><a id="filedown" onclick="xiaoshiFileDownloadDiv();">下载</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                      <td align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javaScript:xiaoshiFileDownloadDiv();">返回</a></td>
                      </tr>
                    </table>
                 </td>
               </tr>
             </table>
</div>
		<script type=text/javascript>
		function getXY(Obj) {
			var sumTop = 0, sumLeft = 0;
			while(Obj != document.body){
			sumLeft += Obj.offsetLeft;sumTop += Obj.offsetTop;Obj = Obj.offsetParent;
			} 
			return {x:sumLeft, y:sumTop};
		}
		
		function beizhuxian(remark,i){
			var pageselect = document.getElementById('pagediv'); 
	 		pageselect.style.display = "none";
			var windowdiv = document.getElementById("windowdiv");
			if(windowdiv.style.display != 'none') {
				beizhuguan();
			}
			if(windowdiv.style.display == 'none') {
				document.getElementById("beizhutrid"+i+"").className="trBgColor";
				document.getElementById("beizhutrid"+i+"").onmouseout = '';
				var beizhudiv = document.getElementById("beizhuid"+i+"");
				var Objxy=getXY(beizhudiv);
				
				var topzhu = windowdiv.style.top;
				var h = document.body.offsetHeight;
				if(h-Objxy.y>200){
					windowdiv.style.top = Objxy.y+23;
				}else{
					windowdiv.style.top = Objxy.y-200;
				}
				windowdiv.style.left = Objxy.x-500;
				document.getElementById('remarkdiv').innerHTML=remark;
				document.getElementById('beizhuid').value=i;
				windowdiv.style.display = 'block';
			}
		}
		
		function beizhuguan(){
			var pageselect = document.getElementById('pagediv'); 
	 		pageselect.style.display = "block";
			var i = document.getElementById('beizhuid').value;
			
			var beizhudiv = document.getElementById("beizhuid"+i+"");
			var Objxy=getXY(beizhudiv);
			
			var b = document.getElementById('beizhutrid'+i+'');
			b.onmouseout=function(){this.className='';};
			document.getElementById("beizhutrid"+i+"").className=null;
			var windowOpendiv = document.getElementById("windowdiv");
			windowdiv.style.display = 'none';
		}
</script>

  </body>
</html>
